unit LotControlDtlReport;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, BookSumReport, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters,
  Menus, cxControls, cxContainer, cxEdit, dxSkinsCore, dxSkinsDefaultPainters,
  cxStyles, dxSkinscxPCPainter, cxDataStorage, DB, cxDBData, DBActns, StdActns,
  ActnList, ImgList, cxClasses, cxGridCustomView, cxGridCustomTableView,
  cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView, cxGrid,
  ComCtrls, cxCheckBox, cxDropDownEdit, cxCalendar, cxLabel, ExtCtrls,
  cxTextEdit, cxMaskEdit, cxDBLookupComboBox, StdCtrls, GlobalInterface,
  MisString, DBClient, cxGridCustomPopupMenu, dxSkinsForm, dxCore, cxDateUtils,
  cxNavigator, cxSplitter, ToolWin, cxCustomData, cxFilter, cxData,
  cxGridPopupMenu, MemDS, DBAccess, Uni, System.Actions, System.ImageList,
  cxTreeView, cxGridLevel, cxLookupEdit, cxDBLookupEdit, cxButtons;

type
  TfrmLotControlDtlReport = class(TfrmBookSumReport)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  protected
  public
    { Public declarations }
    constructor Create(AOwner: TComponent; AParam: TStringList; GroupParam:
      TStringList = nil); reintroduce;
  end;

var
  frmLotControlDtlReport: TfrmLotControlDtlReport;

implementation

{$R *.dfm}

constructor TfrmLotControlDtlReport.Create(AOwner: TComponent; AParam,
  GroupParam: TStringList);
var
  iDepotID: integer;
begin
  inherited;
  edtGroupBy.Visible := True;
  lblGroupBy.Visible := True;
  edtType.Visible := True;
  lblType.visible := True;
  chkSamePriceAllot.Visible := False;

  if (FGroupParamList <> nil) and (FGroupParamList.Count > 0) then
  begin
    if FGroupParamList.Values['depot'] <> '' then
    begin
      iDepotID := StrToIntDef(FGroupParamList.Values['depot'], 0);
      if iDepotID > 0 then
        edtType.ItemIndex := edtType.Properties.Items.IndexOfObject(TObject(iDepotID))
    end;
  end;
end;

procedure TfrmLotControlDtlReport.FormCreate(Sender: TObject);
begin
  if (GetValueSql('select count(1) from tt_book where state=1', 0) > 0) then
  begin
    GlobalCallProc('bill', 'costcalc', 'calcall');
  end;

  inherited;
  edtGroupBy.Visible := True;
  lblGroupBy.Visible := True;
  edtType.Visible := True;
  lblType.visible := True;
  chkSamePriceAllot.Visible := False;

end;

end.


